This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.

Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.

library(ggplot2)
library(plotly)

pulsar <- read.csv("pulsar_stars.csv")
head(pulsar, n = 10)
tail(pulsar, n = 10)
summary(pulsar)
 Mean.of.the.integrated.profile Standard.deviation.of.the.integrated.profile
 Min.   :  5.812                Min.   :24.77                               
 1st Qu.:100.930                1st Qu.:42.38                               
 Median :115.078                Median :46.95                               
 Mean   :111.080                Mean   :46.55                               
 3rd Qu.:127.086                3rd Qu.:51.02                               
 Max.   :192.617                Max.   :98.78                               
 Excess.kurtosis.of.the.integrated.profile
 Min.   :-1.8760                          
 1st Qu.: 0.0271                          
 Median : 0.2232                          
 Mean   : 0.4779                          
 3rd Qu.: 0.4733                          
 Max.   : 8.0695                          
 Skewness.of.the.integrated.profile Mean.of.the.DM.SNR.curve
 Min.   :-1.7919                    Min.   :  0.2132        
 1st Qu.:-0.1886                    1st Qu.:  1.9231        
 Median : 0.1987                    Median :  2.8018        
 Mean   : 1.7703                    Mean   : 12.6144        
 3rd Qu.: 0.9278                    3rd Qu.:  5.4643        
 Max.   :68.1016                    Max.   :223.3921        
 Standard.deviation.of.the.DM.SNR.curve Excess.kurtosis.of.the.DM.SNR.curve
 Min.   :  7.37                         Min.   :-3.139                     
 1st Qu.: 14.44                         1st Qu.: 5.782                     
 Median : 18.46                         Median : 8.434                     
 Mean   : 26.33                         Mean   : 8.304                     
 3rd Qu.: 28.43                         3rd Qu.:10.703                     
 Max.   :110.64                         Max.   :34.540                     
 Skewness.of.the.DM.SNR.curve  target_class    
 Min.   :  -1.977             Min.   :0.00000  
 1st Qu.:  34.961             1st Qu.:0.00000  
 Median :  83.065             Median :0.00000  
 Mean   : 104.858             Mean   :0.09157  
 3rd Qu.: 139.309             3rd Qu.:0.00000  
 Max.   :1191.001             Max.   :1.00000  
lm(pulsar$Excess.kurtosis.of.the.integrated.profile~pulsar$Skewness.of.the.integrated.profile)

Call:
lm(formula = pulsar$Excess.kurtosis.of.the.integrated.profile ~ 
    pulsar$Skewness.of.the.integrated.profile)

Coefficients:
                              (Intercept)  
                                   0.1890  
pulsar$Skewness.of.the.integrated.profile  
                                   0.1631  
hist(pulsar$Mean.of.the.integrated.profile, col = "blue")

plot(pulsar[,1:8], col = "blue", pch = ".")

plot(pulsar[,1:4], col = "blue", pch = ".")

plot(pulsar[,4:8], col = "blue", pch = ".")

plot(pulsar$Standard.deviation.of.the.integrated.profile, pulsar$Skewness.of.the.DM.SNR.curve, col = "blue", pch = "+")

p <- plot_ly(x = ~pulsar$Excess.kurtosis.of.the.integrated.profile, y = ~pulsar$Skewness.of.the.integrated.profile, size = ~pulsar$Excess.kurtosis.of.the.integrated.profile)
p
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plot.ly/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode
`line.width` does not currently support multiple values.No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plot.ly/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode
`line.width` does not currently support multiple values.
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKVGhpcyBpcyBhbiBbUiBNYXJrZG93bl0oaHR0cDovL3JtYXJrZG93bi5yc3R1ZGlvLmNvbSkgTm90ZWJvb2suIFdoZW4geW91IGV4ZWN1dGUgY29kZSB3aXRoaW4gdGhlIG5vdGVib29rLCB0aGUgcmVzdWx0cyBhcHBlYXIgYmVuZWF0aCB0aGUgY29kZS4gCgpUcnkgZXhlY3V0aW5nIHRoaXMgY2h1bmsgYnkgY2xpY2tpbmcgdGhlICpSdW4qIGJ1dHRvbiB3aXRoaW4gdGhlIGNodW5rIG9yIGJ5IHBsYWNpbm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